#include <stdio.h>

int backtrace_xy(void **BUFFER, int SIZE);

void print_call()
{
	int j, nptrs;
	printf("--->into p_call\n");

    #define SIZE 100
    void *buffer[100];
           //char **strings;

    nptrs = backtrace_xy(buffer, SIZE);
    printf("backtrace() returned %d addresses\n", nptrs);

           /* The call backtrace_symbols_fd(buffer, nptrs, STDOUT_FILENO)
              would produce similar output to the following: */

           //strings = backtrace_symbols(buffer, nptrs);
           //if (strings == NULL) {
           //    perror("backtrace_symbols");
           //    exit(EXIT_FAILURE);
           //}
}

void fun1()
{
	printf("--->into 1\n");
 print_call();
}

void fun2()
{
	printf("--->into 2\n");
 fun1();
}

int main(void)
{
	printf("test BT in ARM\n");

    fun2();
}

